<%--
  Created by IntelliJ IDEA.
  User: LikZ
  Date: 2021.8.28
  Time: 下午 15:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>获取表格数据</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<body >
<div class="table-stripe" style="background: #ce8483">
        <table  class="table table-striped table-bordered table-hover table-condensed"  >
            <tr>
                <td>手机序号</td>
                <td>手机名称</td>
                <td>手机价格</td>
                <td>手机描述</td>
                <td>手机图片</td>
            </tr>
            <c:forEach var="product" items="${list}">
                <tr style="text-align: center">
                    <td>${product.id}</td>
                    <td>${product.pname}</td>
                    <td>${product.pprice}</td>
                    <td>${product.pdesc}</td>
                    <td>
                        <img src="image/1.jpg"/>镜黑
                        <img src="image/2.jpg"/>雾蓝
                        <img src="image/3.jpg"/>凝白
                        <img src="image/4.jpg"/>宇宙摩卡
                            <%--<form>
                                <input type="submit" value="修改" class="fu">
                            </form>
                            <a href="${pageContext.request.contextPath}/delete?id=${product.id}" >删除</a>--%>
                            <%--                     <form action="${pageContext.request.contextPath}/delete" method="post">--%>
                            <%--                        <input type="submit" value="删除" name="pname"  class="fu">--%>
                            <%--                    </form>--%>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
    <div >
        <form action="${pageContext.request.contextPath}/delete" method="post">
            删除
            <input type="number" name="number" placeholder="请输入手机序号"/>
            <input type="submit" value="确认"/>
        </form>
    </div>
    <div >
        <form action="${pageContext.request.contextPath}/add" method="post">
            添加
            <input type="number" name="number" placeholder="请输入手机序号"/>
            <input type="text" name="proname" placeholder="请输入手机名称"/>
            <input type="number" name="proprice" placeholder="请输入手机价格"/>
            <input type="text" name="prodesc" placeholder="请输入手机描述"/>
            <input type="submit" value="确认">
        </form>
    </div>
    <div id="update">
        <form action="${pageContext.request.contextPath}/update" method="post">
            修改
            <input type="number" name="number" placeholder="请输入手机序号" />
            <input type="text" name="proname" placeholder="请输入手机名称"/>
            <input type="number" name="proprice" placeholder="请输入手机价格"/>
            <input type="text" name="prodesc" placeholder="请输入手机描述"/>
            <input type="submit" value="确认"/>
        </form>
    </div>
    <div>
        <h3>Mr·Right_v1.0.0</h3>
    </div>
</body>
</html>
